package Box2D.Dynamics.Controllers
{
	import Box2D.Common.Math.b2Vec2;

	public class b2BuoyancyController extends b2Controller
	{
		private var _normal:b2Vec2;
		private var _velocity:b2Vec2;
		private var _gravity:b2Vec2;
		public function b2BuoyancyController()
		{
			super();			
		}		
		public override function set wrapper(value:Object):void{
			super.wrapper = value;
			_normal = new b2Vec2(0,0,_wrapper+32);
			_velocity = new b2Vec2(0,0,_wrapper+48);
			_gravity = new b2Vec2(0,0,_wrapper+66);
		}
		
		public function get normal():b2Vec2{return _normal}
		public function set normal(value:b2Vec2):void{_normal.Copy(value)}
		
		public function get offset():Number{return getNumber(40)}
		public function set offset(value:Number):void{setNumber(40,value)}
		
		public function get density():Number{return getNumber(44)}
		public function set density(value:Number):void{setNumber(44,value)}
		
		public function get velocity():b2Vec2{return _velocity}
		public function set velocity(value:b2Vec2):void{_velocity.Copy(value)}
		
		public function get linearDrag():Number{return getNumber(56)}
		public function set linearDrag(value:Number):void{setNumber(56,value)}
		
		public function get angularDrag():Number{return getNumber(60)}
		public function set angularDrag(value:Number):void{setNumber(60,value)}
		
		public function get useDensity():Boolean{return getBoolean(64)}
		public function set useDensity(value:Boolean):void{setBoolean(64,value)}
		
		public function get useWorldGravity():Boolean{return getBoolean(65)}
		public function set useWorldGravity(value:Boolean):void{setBoolean(65,value)}
		
		public function get gravity():b2Vec2{return _gravity}
		public function set gravity(value:b2Vec2):void{_gravity.Copy(value)}
	}
}